
package com.huaweicloud.saaslanding.install.properties;

import static com.huaweicloud.saaslanding.install.constant.ModelConstant.UPGRADE_SWR_PREFIX;

import jakarta.validation.constraints.NotEmpty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;

/**
 * 功能描述
 *
 * @since 2022-05-17
 */
@EqualsAndHashCode
@Data
@AllArgsConstructor
@NoArgsConstructor
@Component
@Validated
@ConfigurationProperties(prefix = UPGRADE_SWR_PREFIX)
public class UpgradeSwr {

    /**
     * 前端升级镜像
     */
    @NotEmpty(message = "租户微服务镜像(swr.uiSwrOrganization)不能为空")
    private String uiSwrOrganization;

    @NotEmpty(message = "租户微服务镜像(swr.uiSwrName)不能为空")
    private String uiSwrName;

    @NotEmpty(message = "租户微服务镜像(swr.uiSwrVersion)不能为空")
    private String uiSwrVersion;

    /**
     * 授权微服务镜像
     */
    @NotEmpty(message = "租户微服务镜像(swr.tenantAccessPrefix)不能为空")
    private String authoritySwrOrganization;

    @NotEmpty(message = "租户微服务镜像(swr.tenantAccessPrefix)不能为空")
    private String authoritySwrName;

    @NotEmpty(message = "租户微服务镜像(swr.tenantAccessPrefix)不能为空")
    private String authoritySwrVersion;

    /**
     * 订单微服务镜像
     */
    @NotEmpty(message = "订单微服务镜像(swr.orderSwrOrganization)不能为空")
    private String orderSwrOrganization;

    @NotEmpty(message = "部署微服务镜像(swr.orderSwrName)不能为空")
    private String orderSwrName;

    @NotEmpty(message = "部署微服务镜像(swr.orderSwrVersion)不能为空")
    private String orderSwrVersion;

    /**
     * 商品微服务镜像
     */
    @NotEmpty(message = "商品微服务镜像(swr.productSwrOrganization)不能为空")
    private String productSwrOrganization;

    @NotEmpty(message = "商品微服务镜像(swr.productSwrName)不能为空")
    private String productSwrName;

    @NotEmpty(message = "商品微服务镜像(swr.productSwrVersion)不能为空")
    private String productSwrVersion;
}
